/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Commons.Replicazione;


import Discovery.WorkerDiscovery;

/**
 *
 * @author Team5
 */
public class RMDiscovery {

   
    private StatoDiscovery stato;
    private WSClientRMDiscovery ws;
       

    public RMDiscovery() {
        stato=new StatoDiscovery();
        ws =new  WSClientRMDiscovery();
        System.out.println("RMDiscovery()");
    }

    public void aggiornaStato(WorkerDiscovery wd){
       stato.aggiornaStato(wd);
       ws.inviaStato(stato);
    }
    public StatoDiscovery recuperaStato(){
        return ws.bootstrap(stato.getId());
    }

    
}
